package com.oursnail.jms.producers;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created By XJL On 2017/11/5
 */
public class AppProducer {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("producer.xml");
       ProducerServer producerServer =  ctx.getBean(ProducerServer.class);
        for (int i=0;i<100;i++){
            producerServer.sendMessage("test"+i);
        }
    }
}
